package com.qlogic.commons.utils.reflect;

import java.io.Serializable;

public class SourceMessage implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6931849462011311568L;
	
	public static final int ERROR = 0;
	public static final int WARNING = 1;
	public static final int IFORMATION = 2;
	
	private int type;
	private String text;
	
	public SourceMessage () {
	}
	
	public SourceMessage (int type, String text) {
		this.type = type;
		this.text = text;
	}
	
	public static SourceMessage createInformationMessage (String text) {
		return new SourceMessage (IFORMATION, text);
	}
	
	public static SourceMessage createWarningMessage (String text) {
		return new SourceMessage (WARNING, text);
	}
	
	public static SourceMessage createErrorMessage (String text) {
		return new SourceMessage (ERROR, text);
	}
	
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	

}
